package com.jml.jdk8.方法引用;


/**
 * @author:jml
 * @date: 2019/11/27 0027 21:56
 * @description：
 */
public class Student {

    private String name;
    private int score;

    public Student() {
    }

    public Student(String name) {
        this.name = name;
    }

    public Student(String name, int score) {
        this.name = name;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    //按照分数比较
    public static int compareStudentByScore(Student student1, Student student2) {
        return student1.getScore() - student2.getScore();
    }

    //按照名字比较
    public static int compareStudentByName(Student student1, Student student2) {
        return student1.getName().compareToIgnoreCase(student2.getName());
    }


    public int compareScore(Student student){
        return this.score-student.score;
    }
    public int compareName(Student student){
        return this.getName().compareToIgnoreCase(student.getName());
    }

    public Integer tt1(Integer integer){
        return integer*3;
    }
}
